//
//  SCXCreateAlertView.h
//  自定义弹出视图
//
//  Created by Michael on 15/12/31.
//  Copyright © 2015年 Michael. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef void (^Dismiss)(void);
typedef enum : NSInteger{
    kNavigationPop2=1,
    ksortPop2
}popType2;
@protocol ButtonClick;
@protocol SCXCreatePopViewDelegate2;
@interface SCXCreateAlertView2 : UIView<UITableViewDataSource,UITableViewDelegate,UITextFieldDelegate>
@property(nonatomic,strong)UILabel *titleLabel;
@property(nonatomic,assign)id<ButtonClick>delegate;
@property(nonatomic,strong)id<SCXCreatePopViewDelegate2>tableViewDelegate;
@property(nonatomic,strong)NSString *aimTitle;
@property(nonatomic,strong)UITableView *menuTableView;
@property(nonatomic,strong)NSMutableArray *nameArray;
@property(nonatomic,strong)Dismiss dismiss;
@property(nonatomic,assign)CGPoint orign;
@property(nonatomic,assign)CGFloat width;
@property(nonatomic,strong)UIView *view;
@property(nonatomic,strong)UIView *backView;
@property(nonatomic,assign)CGRect backViewFrame;
@property(nonatomic,assign)CGFloat layerSize;
@property(nonatomic,strong)UITextField *textField;
@property(nonatomic,assign)popType2 popViewType;
@property(nonatomic,strong)UIColor *color;
@property(nonatomic,assign)BOOL isSharp;//下拉菜单是否有上面的三角形符号
+(SCXCreateAlertView2 *)shareSingleCreateAlertView;
/*
 自定义一个下拉菜单，传入下拉菜单显示的内容，属性为数组，下拉菜单左上角的位置，下拉菜单的宽度，下拉菜单的高度，每一行的高度，是否将下拉菜单设置为有圆角，传入圆角大小，设置下拉菜单的背景颜色，下拉菜单是否有上访的三角形符号，如果有则设置sharp属性为真，也可传入此下拉菜单的用途，用于复用，不同的情况弹出，对应不用的事件.
 */
-(instancetype)initWithNameArray:(NSMutableArray *)nameArray andMenuOrigin:(CGPoint)orign andMenuWidth:(CGFloat)width andHeight:(CGFloat)rowHeight andLayer:(CGFloat)layer  andTableViewBackGroundColor:(UIColor *)color andIsSharp:(BOOL)sharp andType:(popType2)poptype;
//下拉菜单消失事件
-(void)dismissWithCompletion:(void (^)(SCXCreateAlertView2 *create))completion;

@end
//下拉菜单，代理方法，当点击某一行时候，发生的事件 .
@protocol SCXCreatePopViewDelegate2 <NSObject>

-(void)secondtableViewDidSelectRowAtIndexPath:(NSIndexPath *)indexPath andPopType:(popType2)popViewType;

@end

